﻿using System.Xml.Serialization;
using Microsoft.Xna.Framework;
using Tomahawk.Serialization;
using Tomahawk.Serialization.SerialBoost;

namespace Tomahawk.Resources.Materials
{
    #region SASMaterialTemplateParameter
    public class SASMaterialTemplateParameter
    {
        public enum Type
        {
            Undefined,
            Bool,
            Int,
            Float,
            String,
            Vector,
            Texture
        }

        [XmlAttribute("Type")]
        public Type type = Type.Undefined;

        [XmlAttribute("Name")]
        public string name = "Undefined";

        [XmlElement("BoolValue")]
        public bool boolValue = false;

        [XmlElement("IntValue")]
        public int intValue = 0;

        [XmlElement("FloatValue")]
        public float floatValue = 0.0f;

        [XmlElement("StringValue")]
        public string stringValue = "";

        [XmlElement("VectorValue")]
        public Vector4 vectorValue = Vector4.Zero;

        [XmlElement("TextureValue")]
        public string textureValue = "";

        public SASMaterialTemplateParameter()
        {
        }

        public SASMaterialTemplateParameter(Type type)
        {
            this.type = type;
        }
    }
    #endregion

    #region SASMaterialTemplate
    public class SASEffectTemplate
    {
        [XmlAttribute("Name")]
        public string name;

        [XmlAttribute("EffectName")]
        public string effectName = "Undefined";

        public SerializableList<SASMaterialTemplateParameter> parameters = new SerializableList<SASMaterialTemplateParameter>();
    }
    #endregion
}
